<?php defined('SYSPATH') or die('No direct script access.');

abstract class Controller_Template extends Kohana_Controller_Template {    
    
    protected $widgets_folder = 'widgets';
    
    public function widget_load($widget, $active = null) {
        if ($active != null) {            
            return Request::factory($this->widgets_folder . '/' . $widget.'/'.$active)->execute();
        }
        else {
            return Request::factory($this->widgets_folder . '/' . $widget)->execute();
        }
    }

}
